/*
 *  Copyright 2008 Danny Lagrouw
 *  
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *  
 *      http://www.apache.org/licenses/LICENSE-2.0
 *  
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License. 
 */
package org.bastion.example.domain.service;

import org.bastion.example.domain.Client;
import org.bastion.example.domain.Period;
import org.bastion.example.domain.Reservation;
import org.bastion.example.domain.Vehicle;

/**
 * Usecase: Make a reservation for rental of a vehicle.<br>
 * Prerequisites:
 * <li>User has already registered as a client;
 * <li>User has already chosen a vehicle.
 * Actions:
 * <li>User enters reservation period;
 * <li>System registers reservation;
 * <li>System sends confirmation email.
 * Exceptions:
 * <li>Chosen vehicle is not available during the entire period
 * @author Danny Lagrouw
 */
public class MakeReservation {

	public Reservation makeReservation(Client client, Vehicle vehicle, Period period) {
		return vehicle.reserve(period, client);
	}

}
